package com.accompany.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 聊天会话表
 * </p>
 *
 * @author DC
 * @since 2024-12-26
 */
@Data
@Schema(name = "ChatSessions对象", description = "聊天会话表")
public class ChatSession implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(name = "userId", description = "用户ID")
    private Long userId;

    @Schema(name = "targetId", description = "目标用户ID")
    private Long targetId;

    @Schema(name = "lastMessage", description = "最后一条消息内容")
    private String lastMessage;

    @Schema(name = "lastTime", description = "最后聊天时间")
    private LocalDateTime lastTime;

    @Schema(name = "unreadCount", description = "未读消息数")
    private Integer unreadCount;

    @Schema(name = "status", description = "状态 0:删除 1:正常")
    private Byte status;

    private LocalDateTime createdAt;

    private LocalDateTime updatedAt;
}
